<template>
	<view class="logins">
		<nav-bar isBack  title="创客精英" ></nav-bar>
		<!-- 顶部 -->
		<view class="i_cont">
			<image src="https://cos.ryz1620.com/liankun/static/IMG271.png" mode="widthFix"></image>
			<view class="codeimg"><image src="https://cos.ryz1620.com/liankun/static/IMG274.png" mode="widthFix"></image></view>
			<view class="btnimg" @click="openadmin()"><image src="https://cos.ryz1620.com/liankun/static/IMG270.png" mode="widthFix"></image></view>
		</view>
	</view>
</template>

<script>
import navBar from "@/components/navBar/navBar.vue"
import service_mall from '@/service/mall.js'
import URL from '@/config/url.js'


export default {
	components: { navBar },
	
	data() {
		return {
			userId:"",
		}
	},
	onShareAppMessage(res) {
		let that = this
		if (res.from === 'button') {}
		return {
		  title: '创客精英',
		  path: '/pages/home/index/index?share_uid='+ this.userId,
		  success: function (res) {
			
		  }
		}  
	},
	onLoad(params) {
		this.$utils.getUrl()
		let token = uni.getStorageSync('token')
		if(params.share_uid){
			let shareuId= params.share_uid
			this.$store.commit('index/SET_shareuId', shareuId)
			if(token && shareuId){
				service_mall.getPromoter({share_uid:shareuId})
					.then(res => {
				})
			}
		}
		this.userId = uni.getStorageSync('userId')
	},
	methods: {
		openadmin(){
			uni.navigateToMiniProgram({
			  appId: 'wxe7f34fe6cd1469bf',
			  path: 'pages/mall/newIndex/newIndex',
			  extraData: {},
			  envVersion: 'develop',
			  success(res) {
			    // 打开成功
			  }
			})
		},
	}
}
</script>

<style lang="scss" scoped>
.logins{
	width: 100vw;height: 100vh;background: #fff;display: flex;flex-flow: column;
}
.i_cont{
	position: relative;
	image{
		width: 100%;
	}
	.codeimg{
		width: 300rpx;
		height: 300rpx;
		background: #fff;
		padding: 10rpx;
		position: absolute;
		left: 50%;
		margin-left: -150rpx;
		bottom: 280rpx;
	}
	.btnimg{
		width: 70%;
		position: absolute;
		bottom:40rpx;
		left: 15%;
		
	}
}
</style>